
import Core.IMessageProvider;
import Core.IMessageHandler;
import java.util.Hashtable;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author Mr Bao
 */
public class MessageProvider implements IMessageProvider {

    private Hashtable hashtable = new Hashtable();

    public void Register(Class type, IMessageHandler handler) {
        hashtable.put(type, handler);
    }

    public IMessageHandler GetMessageHandler(Class type) {
        return (IMessageHandler) hashtable.get(type);
    }
}
